/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.vod.net;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;

/**
 * 
 * @author dRazanakoto
 */
public abstract class Receiver extends NetworkWatcher {

	protected InetAddress ip;
	protected int port;

	/**
     *
     */
	public Receiver(InetAddress ip, int port) {
		this.ip = ip;
		this.port = port;
	}

	/**
	 * 
	 * @return
	 */
	public abstract String receive() throws Exception;

	/**
	 * 
	 * @param timeOut
	 * @return
	 */
	public abstract String receive(int timeout) throws Exception;

	/**
	 * 
	 * @param heartbeatSleep
	 * @return
	 * @throws Exception
	 */
	public abstract DatagramPacket receivePacket(int heartbeatSleep)
			throws Exception;

	/**
	 * 
	 * @return
	 * @throws Exception
	 */
	public abstract DatagramPacket receivePacket() throws Exception;

	public void close() {
	}

}
